import request, {pData} from "@/utils/http";
import _ from "lodash";

export default {
    created() {
        this.getList();
    },
    data() {
        return {
            list: [],
            noticeTimer: pData().noticeTimer
        }
    },
    methods: {
        getList() {
            request('/api/appliedModule/page', {
                params: {
                    bizId: pData().notice,
                    pageSize: 999,
                    pageNum: 1,
                    searchSource: 0
                }
            }).then((data) => {
                this.list = _.orderBy(data.data.records, (dateObj) => {
                    return new Date(dateObj.time)
                }, 'desc')
            })
        }
    },
}